﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="query.aspx.cs" Inherits="AnyOffice.general.calendar.manage.query" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>安排查询</title>
		<link rel="stylesheet" type="text/css" href="/module/date_selector/popcalendar.css">
		<script src="/module/date_selector/popcalendar.js"></script>
		<script src="/aspnet_client/core/function.js"></script>
		<script Language="JavaScript">
function CheckForm()
{
   if(!checkIsDate(document.Form1.txtSendTimeMIN.value))
   {
	 alert("开始日期不正确！");
	 document.Form1.txtSendTimeMIN.focus();
	 return (false);
   }
   
   if(!checkIsDate(document.Form1.txtSendTimeMAX.value))
   {
	 alert("结束日期不正确！");
	 document.Form1.txtSendTimeMAX.focus();
	 return (false);
   }
   return (true);
}
		</script>
	</HEAD>
	<body class="bodycolor" topmargin="5">
		<form id="Form1" method="post" runat="server">
			<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
				<tr>
					<td class="Big"><img src="/images/menu/infofind.gif" WIDTH="20" HEIGHT="20" align="absMiddle"><span class="big3">&nbsp;
							<asp:Literal id="litNavTitle" runat="server"></asp:Literal></span>
					</td>
				</tr>
			</table>
			<br>
			<asp:Panel id="pnlMain" runat="server">
				<TABLE class="small" cellSpacing="1" cellPadding="2" width="450" align="center" bgColor="#000000"
					border="0">
					<TR>
						<TD class="TableData" noWrap width="100">日期：</TD>
						<TD class="TableData">
						<INPUT class="BigInput" id="txtSendTimeMIN" type="text" maxLength="10" size="12" name="txtSendTimeMIN"
								runat="server"> <IMG style="CURSOR: hand" onclick="popUpCalendar(this,txtSendTimeMIN,'yyyy-mm-dd','');"
								src="/module/date_selector/calendar.gif" align="absMiddle" border="0"> 至&nbsp;
							<INPUT class="BigInput" id="txtSendTimeMAX" type="text" maxLength="10" size="12" name="SendTimeMAX"
								runat="server"> <IMG style="CURSOR: hand" onclick="popUpCalendar(this,txtSendTimeMAX,'yyyy-mm-dd','');"
								src="/module/date_selector/calendar.gif" align="absMiddle" border="0">
						</TD>
					</TR>
					<TR>
						<TD class="TableData" noWrap>事务类型：</TD>
						<TD class="TableData"><SELECT class="BigSelect" id="selectCalType" name="selectCalType" runat="server">
								<OPTION value="" selected>所有</OPTION>
								<OPTION value="1">工作事务</OPTION>
								<OPTION value="2">个人事务</OPTION>
							</SELECT>
						</TD>
					</TR>
					<TR>
						<TD class="TableData" noWrap>事务内容：</TD>
						<TD class="TableData"><INPUT class="BigInput" id="txtContent" size="33" name="txtContent" runat="server">
						</TD>
					</TR>
					<TR class="TableControl" align="center">
						<TD noWrap colSpan="2">&nbsp; <INPUT class="BigButton" onclick="return CheckForm();" type="submit" value="查询">
						</TD>
					</TR>
				</TABLE>
			</asp:Panel>
			<asp:Panel id="pnlLater" runat="server" Visible="False">
				<asp:Repeater id="rptCalendar" runat="server">
					<HeaderTemplate>
						<TABLE class="small" cellSpacing="1" cellPadding="3" width="95%" bgColor="#000000" border="0">
							<THEAD class="TableHeader">
								<TR>
									<TD noWrap align="center">开始时间</TD>
									<TD noWrap align="center">结束时间</TD>
									<TD noWrap align="center">事务类型</TD>
									<TD noWrap align="center">事务内容</TD>
									<TD noWrap align="center">安排人</TD>
									<TD noWrap align="center">状态</TD>
								</TR>
							</THEAD>
					</HeaderTemplate>
					<ItemTemplate>
						<tr class="TableLine1">
							<td nowrap align="center"><%# Convert.ToDateTime(Eval("StartTime")).ToString("g") %></td>
							<td nowrap align="center"><%# Convert.ToDateTime(Eval("EndTime")).ToString("t") %></td>
							<td nowrap><%# (Convert.ToInt32(Eval("CalType").ToString()) == 1)?"工作事务":"个人事务"%></td>
							<td><%#Eval("Content")%></td>
							<td nowrap align="center"><%# Eval("ManagerUserName")%></td>
							<td nowrap align="center">
								<%# (DateTime.Now >= DateTime.Parse(Eval("StartTime").ToString())) && (DateTime.Now <= DateTime.Parse(Eval("EndTime").ToString()))?"<font color='#00AA00'><b>进行中</span>":"" %>
								<%# (DateTime.Now >= DateTime.Parse(Eval("EndTime").ToString()))?"<font color='#FF0000'><b>过期</span>":"" %>
								<%# (DateTime.Now <= DateTime.Parse(Eval("StartTime").ToString()))?"<font color='#0000AA'><b>未至</span>":"" %>
							</td>
						</tr>
					</ItemTemplate>
					<AlternatingItemTemplate>
					<tr class="TableLine2">
							<td nowrap align="center"><%# Convert.ToDateTime(Eval("StartTime")).ToString("g") %></td>
							<td nowrap align="center"><%# Convert.ToDateTime(Eval("EndTime")).ToString("t") %></td>
							<td nowrap><%# (Convert.ToInt32(Eval("CalType").ToString()) == 1)?"工作事务":"个人事务"%></td>
							<td><%#Eval("Content")%></td>
							<td nowrap align="center"><%# Eval("ManagerUserName")%></td>
							<td nowrap align="center">
								<%# (DateTime.Now >= DateTime.Parse(Eval("StartTime").ToString())) && (DateTime.Now <= DateTime.Parse(Eval("EndTime").ToString()))?"<font color='#00AA00'><b>进行中</span>":"" %>
								<%# (DateTime.Now >= DateTime.Parse(Eval("EndTime").ToString()))?"<font color='#FF0000'><b>过期</span>":"" %>
								<%# (DateTime.Now <= DateTime.Parse(Eval("StartTime").ToString()))?"<font color='#0000AA'><b>未至</span>":"" %>
							</td>
						</tr>
					</AlternatingItemTemplate>
					<FooterTemplate>
						</TABLE>
					</FooterTemplate>
				</asp:Repeater>
				<asp:Literal id="litMessage" runat="server"></asp:Literal>
				<BR>
				<CENTER><INPUT class="BigButton" onclick="history.back();" type="button" value="返回"></CENTER>
				<BR>
			</asp:Panel>
		</form>
	</body>
</HTML>
